Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tracks block time using a Prometheus gauge metric type #1091

Merged
merged 11 commits into from
Sep 26, 2023

Conversation

staheri14
Copy link
Contributor

@staheri14 staheri14 commented Sep 21, 2023

Closes #1077

I have verified the outcome of this pull request, and the block time gauge now correctly appears in the Prometheus endpoint:

# HELP cometbft_consensus_block_time_seconds Duration between this block and the preceding one.
# TYPE cometbft_consensus_block_time_seconds gauge
cometbft_consensus_block_time_seconds{chain_id="mocha-4",version="1.0.0-rc16"} 11.623671263

evan-forbes
evan-forbes previously approved these changes Sep 21, 2023
consensus/state.go Outdated Show resolved Hide resolved
consensus/state.go Outdated Show resolved Hide resolved
@staheri14 staheri14 self-assigned this Sep 22, 2023
@staheri14
Copy link
Contributor Author

staheri14 commented Sep 25, 2023

I've decided to remove the block height label from the block_time_seconds gauge metric. This decision is primarily due to concerns related to increased metric cardinality. Including block height as a label would result in a linear increase in the number of unique label values, which could potentially lead to storage issues and slower Prometheus query performance.

@staheri14 staheri14 marked this pull request as ready for review September 25, 2023 20:12
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@staheri14 staheri14 merged commit e2b3187 into v0.34.x-celestia Sep 26, 2023
17 checks passed
@staheri14 staheri14 deleted the sanaz/block-time-gauge branch September 26, 2023 15:37
@faddat faddat mentioned this pull request Feb 22, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants